package com.xiaozeng.clients;

import com.xiaozeng.param.ProductHotParam;
import com.xiaozeng.utils.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Author: xiaozeng
 * @Date: 2022 11
 * @Description: 调用category-service的接口
 **/
@FeignClient(value = "category-service")
public interface CategoryClient {


    @GetMapping("/category/promo/{categoryName}")
    Result queryByName(@PathVariable String categoryName);

    @PostMapping("/category/hots")
    Result hots(@RequestBody ProductHotParam productHotParam);

    @GetMapping("/category/list")
    Result list();

}
